package ui.util;


import javafx.application.Application;
import ui.Main;
import ui.panel.SetUpStage;
import ui.panel.WelcomeStage;

import java.io.IOException;

/**
 * @author renkaijiang
 * 程序的全局操控类
 */
public class Controller {

    public Controller() throws IOException {
        WelcomeStage welcome = WelcomeStage.getInstance();
        welcome.show();
    }


    /**
     * 实现各个页面的交互，实现最终程序的运行
     *
     * @param main
     */
    public void exec(Main main) throws IOException {
        openSourceURL(main);
    }

    //点击文本打开网站
    private void openSourceURL(Application application) {
        SetUpStage.getInstance().openSourceURL(application);
    }

}